import { RMIProxyObject } from "../../Engine/RMI/RMIProxyObject";
import { IMarketPrx } from "./IMarketPrx";
import { AMI_IMarket_buyMarketItem } from "./AMI_IMarket_buyMarketItem";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { Outgoing } from "../../Engine/RMI/Outgoing";
import { AMI_IMarket_cancelSell } from "./AMI_IMarket_cancelSell";
import { AMI_IMarket_getMySells } from "./AMI_IMarket_getMySells";
import { AMI_IMarket_getRecordByMarketId } from "./AMI_IMarket_getRecordByMarketId";
import { AMI_IMarket_search } from "./AMI_IMarket_search";
import { DictIntIntHelper } from "../Public/DictIntIntHelper";
import { AMI_IMarket_seekBuy } from "./AMI_IMarket_seekBuy";
import { AMI_IMarket_sellItem } from "./AMI_IMarket_sellItem";
import { AMI_IMarket_sellSeekItem } from "./AMI_IMarket_sellSeekItem";
type int = number;
//class IMarketPrxHelper
    
    export  class IMarketPrxHelper extends RMIProxyObject implements IMarketPrx
    {
        constructor()
        {
            
            super();name = "IMarket";
            return;
        }

        public buyMarketItem_async(arg1: AMI_IMarket_buyMarketItem, arg2: number): void
        {
            var loc1=makeContext(session);
            var loc2=makeCall("buyMarketItem");
            var loc3;
            (loc3 = new SerializeStream()).writeLong(arg2);
            Outgoing.invokeAsync(loc1, loc2, loc3, arg1);
            return;
        }

        public cancelSell_async(arg1: AMI_IMarket_cancelSell, arg2: int, arg3: number): void
        {
            var loc1=makeContext(session);
            var loc2=makeCall("cancelSell");
            var loc3;
            (loc3 = new SerializeStream()).writeInt(arg2);
            loc3.writeLong(arg3);
            Outgoing.invokeAsync(loc1, loc2, loc3, arg1);
            return;
        }

        public getMySells_async(arg1: AMI_IMarket_getMySells, arg2: int): void
        {
            var loc1=makeContext(session);
            var loc2=makeCall("getMySells");
            var loc3;
            (loc3 = new SerializeStream()).writeInt(arg2);
            Outgoing.invokeAsync(loc1, loc2, loc3, arg1);
            return;
        }

        public getRecordByMarketId_async(arg1: AMI_IMarket_getRecordByMarketId, arg2: number): void
        {
            var loc1=makeContext(session);
            var loc2=makeCall("getRecordByMarketId");
            var loc3;
            (loc3 = new SerializeStream()).writeLong(arg2);
            Outgoing.invokeAsync(loc1, loc2, loc3, arg1);
            return;
        }

        public search_async(arg1: AMI_IMarket_search, arg2: Map<any, any> /* flash.utils.Dictionary */, arg3: int, arg4: int, arg5: int, arg6: int, arg7: int, arg8: int, arg9: int, arg10: int): void
        {
            var loc1=makeContext(session);
            var loc2=makeCall("search");
            var loc3=new SerializeStream();
            DictIntIntHelper.write(loc3, arg2);
            loc3.writeInt(arg3);
            loc3.writeInt(arg4);
            loc3.writeInt(arg5);
            loc3.writeInt(arg6);
            loc3.writeInt(arg7);
            loc3.writeInt(arg8);
            loc3.writeInt(arg9);
            loc3.writeInt(arg10);
            Outgoing.invokeAsync(loc1, loc2, loc3, arg1);
            return;
        }

        public seekBuy_async(arg1: AMI_IMarket_seekBuy, arg2: int, arg3: int, arg4: int, arg5: int, arg6: int, arg7: int, arg8: Boolean): void
        {
            var loc1=makeContext(session);
            var loc2=makeCall("seekBuy");
            var loc3;
            (loc3 = new SerializeStream()).writeInt(arg2);
            loc3.writeInt(arg3);
            loc3.writeInt(arg4);
            loc3.writeInt(arg5);
            loc3.writeInt(arg6);
            loc3.writeInt(arg7);
            loc3.writeBool(arg8);
            Outgoing.invokeAsync(loc1, loc2, loc3, arg1);
            return;
        }

        public sellItem_async(arg1: AMI_IMarket_sellItem, arg2: int, arg3: string, arg4: int, arg5: int, arg6: int, arg7: int, arg8: Boolean): void
        {
            var loc1=makeContext(session);
            var loc2=makeCall("sellItem");
            var loc3;
            (loc3 = new SerializeStream()).writeInt(arg2);
            loc3.writeString(arg3);
            loc3.writeInt(arg4);
            loc3.writeInt(arg5);
            loc3.writeInt(arg6);
            loc3.writeInt(arg7);
            loc3.writeBool(arg8);
            Outgoing.invokeAsync(loc1, loc2, loc3, arg1);
            return;
        }

        public sellSeekItem_async(arg1: AMI_IMarket_sellSeekItem, arg2: number, arg3: string, arg4: int): void
        {
            var loc1=makeContext(session);
            var loc2=makeCall("sellSeekItem");
            var loc3;
            (loc3 = new SerializeStream()).writeLong(arg2);
            loc3.writeString(arg3);
            loc3.writeInt(arg4);
            Outgoing.invokeAsync(loc1, loc2, loc3, arg1);
            return;
        }

        public static /* const */NAME: string="Message.Game.IMarket";
    }
